package com.lu.dog.dbrowser.ui;

import android.content.Intent;
import android.graphics.Bitmap;
import android.text.TextUtils;

import com.google.zxing.Result;
import com.lu.adog.base.BaseConfig;

import banding.com.google.Zxing.scanview.CaptureActivity;

/**
 * @author Yue
 * @date 2017/12/26 15:08
 */

public class SimpleQRCodeActivity extends CaptureActivity {

    @Override
    protected void handlerDecodeResult(Result result, Bitmap barcode) {
        String resultString = result.getText();
        if (!TextUtils.isEmpty(resultString)) {
            this.setResult(RESULT_OK, getIntent());
            Intent intent = new Intent(SimpleQRCodeActivity.this,WebActivity.class);
            intent.putExtra(BaseConfig.KEY_URL,resultString);
            startActivity(intent);
            finish();
        }
    }
}
